resource "jenkins_job" "pipeline" {
  count    = length(var.jobs)
  name     = lookup(var.jobs[count.index], "name")
  template = lookup(var.jobs[count.index], "template")

  lifecycle {
    create_before_destroy = true
  }

}